package org.word.model.definition;

import lombok.Data;

/**
 *         "disposalUserSet": {
 *           "type": "array",
 *           "description": "处警人员的集合",
 *           "items": {
 *             "$ref": "#/definitions/CadCommonUserVO"
 *           }
 *         },
 *         "incidentAddress": {
 *           "type": "string",
 *           "description": "事发地址"
 *         },
 *         "incidentAppealTime": {
 *           "type": "string",
 *           "format": "date-time",
 *           "example": "2019-10-30 15:34:12",
 *           "description": "接警时间"
 *         },
 */
@Data
public class SwaggerModelProperty {
    /**
     * 最外层，默认为1
     */
    private int level = 1;

    /**
     * key就是属性名称
     */
    private String key;

    /**
     * 数据类型，如string
     */
    private String type;

    private String format;

    /**
     * 描述
     */
    private String description;

    /**
     * 当返回model是如下方式时，
     * Message<IPage<AddressNameRespVO>>
     * 其在json中形式如下：
     *       "properties": {
     *         "code": {
     *           "type": "string",
     *           "description": "错误码"
     *         },
     *         "data": {
     *           "description": "数据内容",
     *           "$ref": "#/definitions/IPage?地名库返回对象?"
     *         },
     *         "message": {
     *           "type": "string",
     *           "description": "错误码描述"
     *         }
     *       },
     */
    private String ref;

    private Object example;

    /**
     * 当type为array时有值
     */
    private SwaggerModelDefinitionRef items;
}
